package com.kool.evowkf.bean.io.approve;

import com.kool.core.base.BaseBean;
import com.kool.core.exception.AppException;
import com.kool.core.validate.IIoValidate;

/**
 * @AUTHOR LUYU
 */
public class CMQRYWKFRCDXBean extends BaseBean implements IIoValidate {
	protected String wkfNbr;
	protected String businessId;
	protected String businessType;
	protected String startUserCid;
	protected String startLoginName;
	protected String endUserCid;
	protected String endLoginName;
	protected String state;
	protected String timeBeginMin;
	protected String timeBeginMax;

	public String getWkfNbr() {
		return wkfNbr;
	}

	public void setWkfNbr(String wkfNbr) {
		this.wkfNbr = wkfNbr;
	}

	public String getBusinessId() {
		return businessId;
	}

	public void setBusinessId(String businessId) {
		this.businessId = businessId;
	}

	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}

	public String getStartUserCid() {
		return startUserCid;
	}

	public void setStartUserCid(String startUserCid) {
		this.startUserCid = startUserCid;
	}

	public String getStartLoginName() {
		return startLoginName;
	}

	public void setStartLoginName(String startLoginName) {
		this.startLoginName = startLoginName;
	}

	public String getEndUserCid() {
		return endUserCid;
	}

	public void setEndUserCid(String endUserCid) {
		this.endUserCid = endUserCid;
	}

	public String getEndLoginName() {
		return endLoginName;
	}

	public void setEndLoginName(String endLoginName) {
		this.endLoginName = endLoginName;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getTimeBeginMin() {
		return timeBeginMin;
	}

	public void setTimeBeginMin(String timeBeginMin) {
		this.timeBeginMin = timeBeginMin;
	}

	public String getTimeBeginMax() {
		return timeBeginMax;
	}

	public void setTimeBeginMax(String timeBeginMax) {
		this.timeBeginMax = timeBeginMax;
	}

	@Override
	public void validate() throws AppException {
		// 最大长度校验
		if (wkfNbr != null && wkfNbr.length() > 16) {
			throw new AppException("SY000038","wkfNbr",String.valueOf(16));//字段[%1]大于最大长度[%2]
		}
		// 最大长度校验
		if (businessId != null && businessId.length() > 60) {
			throw new AppException("SY000038","businessId",String.valueOf(60));//字段[%1]大于最大长度[%2]
		}
		// 最大长度校验
		if (startUserCid != null && startUserCid.length() > 10) {
			throw new AppException("SY000038","startUserCid",String.valueOf(10));//字段[%1]大于最大长度[%2]
		}
		// 最大长度校验
		if (startLoginName != null && startLoginName.length() > 60) {
			throw new AppException("SY000038","startLoginName",String.valueOf(60));//字段[%1]大于最大长度[%2]
		}
		// 最大长度校验
		if (endUserCid != null && endUserCid.length() > 10) {
			throw new AppException("SY000038","endUserCid",String.valueOf(10));//字段[%1]大于最大长度[%2]
		}
		// 最大长度校验
		if (endLoginName != null && endLoginName.length() > 60) {
			throw new AppException("SY000038","endLoginName",String.valueOf(60));//字段[%1]大于最大长度[%2]
		}
	}
}